
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>3.2 安装与配置 Taro · Taro for Harmony教程</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="坚果派">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-pageview-count/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-plus/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-mind-maps/mindmaps.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-emphasize/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-anchors/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-ace/ace.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-theme-lou/lou.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../styles/website.css">
        
    

        
    
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="3.Taro运行多平台.html" />
    
    
    <link rel="prev" href="1.Taro介绍.html" />
    

    <style>
    @media only screen and (max-width: 640px) {
        .book-header .hidden-mobile {
            display: none;
        }
    }
    </style>
    <script>
        window["gitbook-plugin-github-buttons"] = {"repo":"ITmxs/gitbook","types":["star","watch","fork"],"size":"small"};
    </script>

    </head>
    <body>
         
<div class="donate-modal modal">
  <div class="modal-header">
    <div>
      <span>
        <img
          id="modal-avatar"
          class="modal-avatar"
          src="http://xkapp-uat.oss-cn-hangzhou.aliyuncs.com/2e7a3f70-80ab-4b50-93ec-a04dfeef949b/avatar-100.png"
        />
      </span>
      <span id="nickname"> breeze </span>
      <p class="modal-close close" onclick="closeDonateModal()">×</p>
    </div>
    <div class="message">
      <div class="tip">
        <i></i>
        <span>随意打赏，但不要超过一顿早餐钱 💕</span>
      </div>
    </div>
  </div>
  <div class="modal-content">
    <div class="modal-pay-way">
      <div id="wxpay" onclick="showDonateImg(0)">
        <input
          type="radio"
          name="pay-way"
          value="wxpay"
          class="zs-type"
          checked="checked"
        />
        <span>
          <img
            id="wxpay-logo"
            src=""
          />
        </span>
      </div>
      <div id="alipay" onclick="showDonateImg(1)">
        <input type="radio" name="pay-way" value="alipay" class="zs-type" />
        <span>
          <img
            id="alipay-logo"
            src=""
          />
        </span>
      </div>
    </div>
    <div class="modal-pay-qrcode">
      <img id="wxpay-code" src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202901895.png" />
      <img
        id="alipay-code"
        src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202843746.png"
        hidden
      />
    </div>
  </div>
</div>
<div class="mask"></div>


<div class="book">
  <div class="header-inner">
    <!-- LOGO -->
    <div class="logo"></div>
    <span class="title"></span>

    <!-- Search -->
    
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>


    <!-- Nav -->
    <ul class="header-nav">
      <li>
        <a href="https://www.gitbook.com/" target="_blank">坚果派官网</a>
      </li><li>
        <a href="https://www.npmjs.com/package/package" target="_blank">ArkUI实战</a>
      </li><li>
        <a href="https://space.bilibili.com/480883651" target="_blank">元服务开发实践</a>
      </li><li>
        <a href="https://blog.51cto.com/jianguo" target="_blank">OpenHarmony应用开发</a>
      </li>
    </ul>
  </div>

  <div class="book-summary">
    <div class="book-summary-title">文档目录</div>
     
    <nav role="navigation">


<ul class="summary">
    
    

    

    
        
        <li class="header">第一篇：基础篇</li>
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    前言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../为什么要写博客.html">
            
                <a href="../为什么要写博客.html">
            
                    
                    为什么选择 Taro For Harmony？
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">第二篇：Taro 入门</li>
        
        
    
        <li class="chapter " data-level="2.1" data-path="1.Taro介绍.html">
            
                <a href="1.Taro介绍.html">
            
                    
                    3.1 Taro 框架介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="2.2" data-path="2.安装Taro.html">
            
                <a href="2.安装Taro.html">
            
                    
                    3.2 安装与配置 Taro
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="3.Taro运行多平台.html">
            
                <a href="3.Taro运行多平台.html">
            
                    
                    3.3 Taro 多平台运行
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="4.Taro配置.html">
            
                <a href="4.Taro配置.html">
            
                    
                    3.4 Taro 项目配置详解
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">第三篇：鸿蒙平台开发</li>
        
        
    
        <li class="chapter " data-level="3.1" data-path="5.鸿蒙版Taro搭建开发环境.html">
            
                <a href="5.鸿蒙版Taro搭建开发环境.html">
            
                    
                    4.1 鸿蒙版 Taro 开发环境搭建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="6.鸿蒙版taro编译配置.html">
            
                <a href="6.鸿蒙版taro编译配置.html">
            
                    
                    4.2 鸿蒙版 Taro 编译配置
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">第四篇：进阶开发</li>
        
        
    
        <li class="chapter " data-level="4.1" data-path="../chapter5/1.组件开发与适配.html">
            
                <a href="../chapter5/1.组件开发与适配.html">
            
                    
                    5.1 组件开发与适配
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="../chapter5/2.状态管理.md">
            
                <span>
            
                    
                    5.2 状态管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="../chapter5/3.路由与导航.md">
            
                <span>
            
                    
                    5.3 路由与导航
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.4" data-path="../chapter5/4.网络请求与数据处理.md">
            
                <span>
            
                    
                    5.4 网络请求与数据处理
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">第五篇：实战项目</li>
        
        
    
        <li class="chapter " data-level="5.1" data-path="../chapter6/1.项目架构设计.md">
            
                <span>
            
                    
                    6.1 项目架构设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="../chapter6/2.实战案例.md">
            
                <span>
            
                    
                    6.2 实战案例：待办事项应用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.3" data-path="../chapter6/3.性能优化与调试.md">
            
                <span>
            
                    
                    6.3 性能优化与调试
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.4" data-path="../chapter6/4.发布与部署.md">
            
                <span>
            
                    
                    6.4 发布与部署
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>

</nav>
     
  </div>

  <!-- Content nav -->
  <div class="book-anchor">
    <div class="book-anchor-title"></div>

    <div class="book-anchor-body"></div>
  </div>

  <div class="book-body">
    
    <div class="body-inner">
       

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >3.2 安装与配置 Taro</a>
    </h1>
</div>



      <div class="page-wrapper" tabindex="-1" role="main">
        <div class="page-inner">
          
<div class="search-plus" id="book-search-results">
    <div class="search-noresults">
    
          <section class="normal markdown-section">
             
                <div id="vip-container">
                    <h1 id="&#x9E3F;&#x8499;-&#x7248;taro-&#x5B9E;&#x6218;&#xFF1A;&#x642D;&#x5EFA;&#x5F00;&#x53D1;&#x73AF;&#x5883;"><a name="&#x9E3F;&#x8499;-&#x7248;taro-&#x5B9E;&#x6218;&#xFF1A;&#x642D;&#x5EFA;&#x5F00;&#x53D1;&#x73AF;&#x5883;" class="plugin-anchor" href="#&#x9E3F;&#x8499;-&#x7248;taro-&#x5B9E;&#x6218;&#xFF1A;&#x642D;&#x5EFA;&#x5F00;&#x53D1;&#x73AF;&#x5883;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x9E3F;&#x8499; &#x7248;Taro &#x5B9E;&#x6218;&#xFF1A;&#x642D;&#x5EFA;&#x5F00;&#x53D1;&#x73AF;&#x5883;</h1>
<h2 id="&#x4E00;&#x3001;&#x914D;&#x7F6E;&#x9E3F;&#x8499;&#x73AF;&#x5883;"><a name="&#x4E00;&#x3001;&#x914D;&#x7F6E;&#x9E3F;&#x8499;&#x73AF;&#x5883;" class="plugin-anchor" href="#&#x4E00;&#x3001;&#x914D;&#x7F6E;&#x9E3F;&#x8499;&#x73AF;&#x5883;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x4E00;&#x3001;&#x914D;&#x7F6E;&#x9E3F;&#x8499;&#x73AF;&#x5883;</h2>
<h3 id="&#x4E0B;&#x8F7D;&#x5B89;&#x88C5;-deveco"><a name="&#x4E0B;&#x8F7D;&#x5B89;&#x88C5;-deveco" class="plugin-anchor" href="#&#x4E0B;&#x8F7D;&#x5B89;&#x88C5;-deveco"><i class="fa fa-link" aria-hidden="true"></i></a>&#x4E0B;&#x8F7D;&#x5B89;&#x88C5; DevEco</h3>
<p>&#x5EFA;&#x8BAE;&#x4F7F;&#x7528;&#x6700;&#x65B0;&#x7248;&#x672C;&#x7684; IDE&#xFF0C;&#x5F53;&#x524D;&#x4E3A; 5.0.5Release &#x7248;&#x672C;&#x3002;</p>
<h2 id="&#x4E8C;&#x3001;&#x521B;&#x5EFA;&#x9E3F;&#x8499;&#x9879;&#x76EE;"><a name="&#x4E8C;&#x3001;&#x521B;&#x5EFA;&#x9E3F;&#x8499;&#x9879;&#x76EE;" class="plugin-anchor" href="#&#x4E8C;&#x3001;&#x521B;&#x5EFA;&#x9E3F;&#x8499;&#x9879;&#x76EE;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x4E8C;&#x3001;&#x521B;&#x5EFA;&#x9E3F;&#x8499;&#x9879;&#x76EE;</h2>
<p>&#x6253;&#x5F00; DevEco&#xFF0C;&#x70B9;&#x51FB;&#x53F3;&#x4E0A;&#x89D2;&#x7684; <code>Create Project</code>&#xFF0C;&#x5728; <code>Application</code> &#x5904;&#x9009;&#x62E9; <code>Empty Ability</code>&#xFF0C;&#x70B9;&#x51FB; <code>Next</code>&#xFF0C;&#x8FDB;&#x5165;&#x914D;&#x7F6E;&#x9875;&#x9762;&#xFF0C;&#x6839;&#x636E;&#x9700;&#x6C42;&#x8C03;&#x6574;&#x5185;&#x5BB9;&#xFF0C;&#x8FD9;&#x91CC;&#x4F7F;&#x7528;&#x9ED8;&#x8BA4;&#x914D;&#x7F6E;&#xFF1A;</p>
<ol>
<li>Project name&#xFF1A;<code>tarooh</code></li>
<li>Bundle name&#xFF1A;<code>com.nutpi.taro</code></li>
<li>Save location&#xFF1A;&#x9009;&#x62E9;&#x9700;&#x8981;&#x521B;&#x5EFA;&#x7684;&#x76EE;&#x5F55;&#xFF0C;&#x4F8B;&#x5982; <code>~/test/tarooh</code></li>
<li>Module name&#xFF1A;<code>entry</code></li>
</ol>
<p>&#x6CE8;&#x610F;&#xFF0C;&#x5F53;&#x524D; Taro &#x652F;&#x6301;&#x7684; SDK &#x7248;&#x672C;&#x4E3A; 4.1.1&#x3002;</p>
<p>&#x70B9;&#x51FB; <code>Finish</code> &#x5B8C;&#x6210;&#x9879;&#x76EE;&#x521B;&#x5EFA;&#x3002;</p>
<h2 id="&#x4E09;&#x3001;&#x5B89;&#x88C5;-taro-41"><a name="&#x4E09;&#x3001;&#x5B89;&#x88C5;-taro-41" class="plugin-anchor" href="#&#x4E09;&#x3001;&#x5B89;&#x88C5;-taro-41"><i class="fa fa-link" aria-hidden="true"></i></a>&#x4E09;&#x3001;&#x5B89;&#x88C5; Taro 4.1</h2>
<pre><code class="lang-bash">npm install -g @tarojs/cli
</code></pre>
<p>&#x5B89;&#x88C5;&#x6210;&#x529F;&#x540E;&#xFF0C;&#x68C0;&#x67E5; <code>taro</code> &#x662F;&#x5426;&#x751F;&#x6548;&#xFF1A;</p>
<pre><code class="lang-bash">taro --version
</code></pre>
<p>&#x9884;&#x671F;&#x8F93;&#x51FA;&#xFF1A;</p>
<pre><code>&#x1F47D; Taro v4.1.1

4.1.1
</code></pre><h2 id="&#x521D;&#x59CB;&#x5316;&#x9879;&#x76EE;"><a name="&#x521D;&#x59CB;&#x5316;&#x9879;&#x76EE;" class="plugin-anchor" href="#&#x521D;&#x59CB;&#x5316;&#x9879;&#x76EE;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x521D;&#x59CB;&#x5316;&#x9879;&#x76EE;</h2>
<pre><code class="lang-bash">taro init taro-ohos
</code></pre>
<p>&#x6309;&#x7167;&#x63D0;&#x793A;&#x8F93;&#x5165;&#x4EE5;&#x4E0B;&#x914D;&#x7F6E;&#xFF1A;</p>
<p>&#x6CE8;&#x610F;&#xFF1A;&#x5F53;&#x524D;&#x4EC5;&#x652F;&#x6301;&#x4F7F;&#x7528; Vite &#x7F16;&#x8BD1;&#x9E3F;&#x8499;&#x5E94;&#x7528;&#xFF0C;&#x6240;&#x4EE5;&#x5728;&#x914D;&#x7F6E;&#x65F6;&#x8BF7;&#x6CE8;&#x610F;&#x9009;&#x62E9;&#x3002;</p>
<pre><code class="lang-bash">? &#x8BF7;&#x8F93;&#x5165;&#x9879;&#x76EE;&#x4ECB;&#x7ECD; taro ohos
? &#x8BF7;&#x9009;&#x62E9;&#x6846;&#x67B6; React
? &#x662F;&#x5426;&#x9700;&#x8981;&#x4F7F;&#x7528; TypeScript&#xFF1F;Yes
? &#x8BF7;&#x9009;&#x62E9; CSS &#x9884;&#x5904;&#x7406;&#x5668;&#xFF08;Sass/Less/Stylus&#xFF09;Sass
? &#x8BF7;&#x9009;&#x62E9;&#x5305;&#x7BA1;&#x7406;&#x5DE5;&#x5177; yarn
? &#x8BF7;&#x9009;&#x62E9;&#x7F16;&#x8BD1;&#x5DE5;&#x5177; Vite
? &#x8BF7;&#x9009;&#x62E9;&#x6A21;&#x677F;&#x6E90; Gitee&#xFF08;&#x6700;&#x5FEB;&#xFF09;
&#x2714; &#x62C9;&#x53D6;&#x8FDC;&#x7A0B;&#x6A21;&#x677F;&#x4ED3;&#x5E93;&#x6210;&#x529F;&#xFF01;
? &#x8BF7;&#x9009;&#x62E9;&#x6A21;&#x677F; &#x9ED8;&#x8BA4;&#x6A21;&#x677F;
</code></pre>
<p>&#x7B49;&#x5F85;&#x9879;&#x76EE;&#x521B;&#x5EFA;&#x6210;&#x529F;&#xFF0C;&#x76F4;&#x5230;&#x8F93;&#x51FA;&#x4EE5;&#x4E0B;&#x63D0;&#x793A;&#xFF1A;</p>
<pre><code class="lang-bash">Done <span class="hljs-keyword">in</span> 44.95s.
&#x2714; &#x5B89;&#x88C5;&#x9879;&#x76EE;&#x4F9D;&#x8D56;&#x6210;&#x529F;
&#x521B;&#x5EFA;&#x9879;&#x76EE; taro-ohos &#x6210;&#x529F;&#xFF01;
&#x8BF7;&#x8FDB;&#x5165;&#x9879;&#x76EE;&#x76EE;&#x5F55; taro-ohos &#x5F00;&#x59CB;&#x5DE5;&#x4F5C;&#x5427;&#xFF01;&#x1F61D;
</code></pre>
<h2 id="&#x56DB;&#x3001;&#x5B89;&#x88C5;&#x9E3F;&#x8499;&#x63D2;&#x4EF6;"><a name="&#x56DB;&#x3001;&#x5B89;&#x88C5;&#x9E3F;&#x8499;&#x63D2;&#x4EF6;" class="plugin-anchor" href="#&#x56DB;&#x3001;&#x5B89;&#x88C5;&#x9E3F;&#x8499;&#x63D2;&#x4EF6;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x56DB;&#x3001;&#x5B89;&#x88C5;&#x9E3F;&#x8499;&#x63D2;&#x4EF6;</h2>
<pre><code class="lang-bash"><span class="hljs-built_in">cd</span> taro-ohos
</code></pre>
<p>&#x7136;&#x540E;&#x4F7F;&#x7528; npm &#x5B89;&#x88C5;&#xFF1A;</p>
<pre><code class="lang-bash">npm i @tarojs/plugin-platform-harmony-cpp
</code></pre>
<p>&#x6216;&#x8005;&#x4F7F;&#x7528; pnpm &#x5B89;&#x88C5;&#xFF1A;</p>
<pre><code class="lang-bash">pnpm i @tarojs/plugin-platform-harmony-cpp
</code></pre>
<h2 id="&#x4E94;&#x3001;&#x4FEE;&#x6539;&#x7F16;&#x8BD1;&#x914D;&#x7F6E;"><a name="&#x4E94;&#x3001;&#x4FEE;&#x6539;&#x7F16;&#x8BD1;&#x914D;&#x7F6E;" class="plugin-anchor" href="#&#x4E94;&#x3001;&#x4FEE;&#x6539;&#x7F16;&#x8BD1;&#x914D;&#x7F6E;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x4E94;&#x3001;&#x4FEE;&#x6539;&#x7F16;&#x8BD1;&#x914D;&#x7F6E;</h2>
<p>&#x627E;&#x5230; <code>config/index.ts</code> &#x6587;&#x4EF6;&#xFF0C;&#x5728; <code>plugin</code> &#x5904;&#x6DFB;&#x52A0; <code>@tarojs/plugin-platform-harmony-cpp</code>&#xFF0C;&#x5E76;&#x5728; <code>rn</code> &#x4E0B;&#x65B9;&#x6DFB;&#x52A0; harmony &#x914D;&#x7F6E;&#xFF1A;</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> os from <span class="hljs-string">&apos;os&apos;</span>
<span class="hljs-keyword">import</span> path from <span class="hljs-string">&apos;path&apos;</span>

<span class="hljs-keyword">const</span> config = {
  <span class="hljs-comment">// ...</span>
 plugins: [
      [<span class="hljs-string">&apos;@tarojs/plugin-platform-harmony-cpp&apos;</span>, {

      }]
    ],
    harmony: {
      <span class="hljs-comment">// compiler: &apos;vite&apos;,</span>
      projectPath: path.join(os.homedir(), <span class="hljs-string">&apos;/Desktop/test/tarooh&apos;</span>),
      hapName: <span class="hljs-string">&apos;entry&apos;</span>,
    },
  <span class="hljs-comment">// ...</span>
}
</code></pre>
<p>&#x6CE8;&#x610F;&#xFF1A;&#x5C06; <code>projectPath</code> &#x8BBE;&#x7F6E;&#x4E3A; DevEco &#x521B;&#x5EFA;&#x7684;&#x9E3F;&#x8499;&#x9879;&#x76EE;&#x76EE;&#x5F55;&#x3002;</p>
<h2 id="&#x516D;&#x3001;&#x7F16;&#x8BD1;&#x9E3F;&#x8499;&#x5E94;&#x7528;"><a name="&#x516D;&#x3001;&#x7F16;&#x8BD1;&#x9E3F;&#x8499;&#x5E94;&#x7528;" class="plugin-anchor" href="#&#x516D;&#x3001;&#x7F16;&#x8BD1;&#x9E3F;&#x8499;&#x5E94;&#x7528;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x516D;&#x3001;&#x7F16;&#x8BD1;&#x9E3F;&#x8499;&#x5E94;&#x7528;</h2>
<pre><code class="lang-bash"><span class="hljs-comment"># &#x7F16;&#x8BD1;&#x9E3F;&#x8499;&#x5E94;&#x7528;</span>
taro build --type harmony_cpp
<span class="hljs-comment"># &#x7F16;&#x8BD1;&#x9E3F;&#x8499;&#x539F;&#x751F;&#x7EC4;&#x4EF6;</span>
taro build native-components --type harmony_cpp
</code></pre>
<p>&#x5982;&#x679C;&#x9700;&#x8981;&#x540C;&#x65F6;&#x7F16;&#x8BD1;&#x9E3F;&#x8499;&#x5E94;&#x7528;&#x548C;&#x539F;&#x751F;&#x7EC4;&#x4EF6;&#xFF0C;&#x53EF;&#x4EE5;&#x5728;&#x9875;&#x9762;&#x914D;&#x7F6E;&#x4E2D;&#x6DFB;&#x52A0; <code>entryOption: false</code> &#x8868;&#x793A;&#x8BE5;&#x9875;&#x9762;&#x662F;&#x7EC4;&#x4EF6;&#xFF0C;&#x5E76;&#x901A;&#x8FC7; <code>componentName</code> &#x6307;&#x5B9A;&#x7EC4;&#x4EF6;&#x5BFC;&#x51FA;&#x540D;&#xFF1A;</p>
<pre><code class="lang-diff">export default {
  navigationBarTitleText: &apos;Hello World&apos;,
<span class="hljs-addition">+  componentName: &apos;MyComponent&apos;,</span>
<span class="hljs-addition">+  entryOption: false,</span>
}
</code></pre>
<p>Taro &#x4F1A;&#x5C06;&#x7F16;&#x8BD1;&#x597D;&#x7684;&#x6587;&#x4EF6;&#x8F93;&#x51FA;&#x81F3;&#x9E3F;&#x8499;&#x9879;&#x76EE;&#x76EE;&#x5F55;&#x3002;</p>
<h2 id="&#x4E03;&#x3001;&#x8FD0;&#x884C;&#x9E3F;&#x8499;&#x5E94;&#x7528;"><a name="&#x4E03;&#x3001;&#x8FD0;&#x884C;&#x9E3F;&#x8499;&#x5E94;&#x7528;" class="plugin-anchor" href="#&#x4E03;&#x3001;&#x8FD0;&#x884C;&#x9E3F;&#x8499;&#x5E94;&#x7528;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x4E03;&#x3001;&#x8FD0;&#x884C;&#x9E3F;&#x8499;&#x5E94;&#x7528;</h2>
<h3 id="1&#x914D;&#x7F6E;&#x5E94;&#x7528;&#x7B7E;&#x540D;"><a name="1&#x914D;&#x7F6E;&#x5E94;&#x7528;&#x7B7E;&#x540D;" class="plugin-anchor" href="#1&#x914D;&#x7F6E;&#x5E94;&#x7528;&#x7B7E;&#x540D;"><i class="fa fa-link" aria-hidden="true"></i></a>1.&#x914D;&#x7F6E;&#x5E94;&#x7528;&#x7B7E;&#x540D;</h3>
<p>&#x6253;&#x5F00; <code>File</code> -&gt; <code>Project Structure...</code>&#xFF0C;&#x70B9;&#x51FB; <code>Signing Configs</code>&#xFF0C;&#x70B9;&#x51FB; <code>Sign In</code>&#xFF0C;&#x767B;&#x5F55;&#x534E;&#x4E3A;&#x8D26;&#x53F7;&#xFF0C;&#x70B9;&#x51FB;&#x53F3;&#x4E0B;&#x89D2; <code>Apply</code>&#xFF0C;&#x7136;&#x540E;&#x70B9;&#x51FB; <code>OK</code>&#xFF0C;&#x5B8C;&#x6210;&#x7B7E;&#x540D;&#x914D;&#x7F6E;&#x3002;</p>
<pre><code class="lang-js">{
  <span class="hljs-string">&quot;name&quot;</span>: <span class="hljs-string">&quot;entry&quot;</span>,
  <span class="hljs-string">&quot;version&quot;</span>: <span class="hljs-string">&quot;1.0.0&quot;</span>,
  <span class="hljs-string">&quot;description&quot;</span>: <span class="hljs-string">&quot;Please describe the basic information.&quot;</span>,
  <span class="hljs-string">&quot;main&quot;</span>: <span class="hljs-string">&quot;&quot;</span>,
  <span class="hljs-string">&quot;author&quot;</span>: <span class="hljs-string">&quot;&quot;</span>,
  <span class="hljs-string">&quot;license&quot;</span>: <span class="hljs-string">&quot;&quot;</span>,
  <span class="hljs-string">&quot;dependencies&quot;</span>: {
    <span class="hljs-string">&quot;@taro-oh/library&quot;</span>: <span class="hljs-string">&quot;file:../static/@taro-oh/library-4.1.1.har&quot;</span>
  },
  <span class="hljs-string">&quot;devDependencies&quot;</span>: {}
}
</code></pre>
<h3 id="2&#x8FD0;&#x884C;&#x5E94;&#x7528;"><a name="2&#x8FD0;&#x884C;&#x5E94;&#x7528;" class="plugin-anchor" href="#2&#x8FD0;&#x884C;&#x5E94;&#x7528;"><i class="fa fa-link" aria-hidden="true"></i></a>2.&#x8FD0;&#x884C;&#x5E94;&#x7528;</h3>
<p>&#x5728; DevEco &#x4E2D;&#xFF0C;&#x70B9;&#x51FB;&#x8FD0;&#x884C;&#x6309;&#x94AE;&#x3002;</p>
<p><img src="https://nutpi-e41b.obs.cn-north-4.myhuaweicloud.com/image-20250519091441660.png" alt="image-20250519091441660"></p>
<p><img src="https://nutpi-e41b.obs.cn-north-4.myhuaweicloud.com/image-20250518181807378.png" alt="image-20250518181807378"></p>
<h2 id="&#x516B;&#x3001;&#x5E38;&#x89C1;&#x95EE;&#x9898;&#x89E3;&#x7B54;&#xFF08;faq&#xFF09;"><a name="&#x516B;&#x3001;&#x5E38;&#x89C1;&#x95EE;&#x9898;&#x89E3;&#x7B54;&#xFF08;faq&#xFF09;" class="plugin-anchor" href="#&#x516B;&#x3001;&#x5E38;&#x89C1;&#x95EE;&#x9898;&#x89E3;&#x7B54;&#xFF08;faq&#xFF09;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x516B;&#x3001;&#x5E38;&#x89C1;&#x95EE;&#x9898;&#x89E3;&#x7B54;&#xFF08;FAQ&#xFF09;</h2>
<h3 id="1&#x4E0D;&#x5B58;&#x5728;&#x7F16;&#x8BD1;&#x5E73;&#x53F0;-platform"><a name="1&#x4E0D;&#x5B58;&#x5728;&#x7F16;&#x8BD1;&#x5E73;&#x53F0;-platform" class="plugin-anchor" href="#1&#x4E0D;&#x5B58;&#x5728;&#x7F16;&#x8BD1;&#x5E73;&#x53F0;-platform"><i class="fa fa-link" aria-hidden="true"></i></a>1.&#x4E0D;&#x5B58;&#x5728;&#x7F16;&#x8BD1;&#x5E73;&#x53F0; ${platform}</h3>
<p>&#x82E5;&#x8FD0;&#x884C; Taro &#x65F6;&#x51FA;&#x73B0; <code>throw new Error(&apos;&#x4E0D;&#x5B58;&#x5728;&#x7F16;&#x8BD1;&#x5E73;&#x53F0; ${platform}&apos;)</code> &#x9519;&#x8BEF;&#xFF0C;&#x53EF;&#x80FD;&#x662F;&#x56E0;&#x4E3A; <code>config/index.ts</code> &#x6587;&#x4EF6;&#x4E2D;&#x672A;&#x6DFB;&#x52A0; <code>@tarojs/plugin-platform-harmony-cpp</code> &#x63D2;&#x4EF6;&#x3002;</p>
<h3 id="2eperm-operation-not-permitted"><a name="2eperm-operation-not-permitted" class="plugin-anchor" href="#2eperm-operation-not-permitted"><i class="fa fa-link" aria-hidden="true"></i></a>2.EPERM: operation not permitted</h3>
<p>&#x9047;&#x5230;&#x6743;&#x9650;&#x95EE;&#x9898;&#x65F6;&#xFF0C;&#x53EF;&#x6267;&#x884C;&#x4EE5;&#x4E0B;&#x547D;&#x4EE4;&#xFF1A;</p>
<pre><code class="lang-bash">mkdir -p ~/.npm-global/lib/node_modules
npm config <span class="hljs-built_in">set</span> prefix <span class="hljs-string">&apos;~/.npm-global&apos;</span>

npm install -g @tarojs/cli
</code></pre>
<h2 id="&#x4E5D;&#x3001;&#x53C2;&#x8003;&#x8D44;&#x6599;"><a name="&#x4E5D;&#x3001;&#x53C2;&#x8003;&#x8D44;&#x6599;" class="plugin-anchor" href="#&#x4E5D;&#x3001;&#x53C2;&#x8003;&#x8D44;&#x6599;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x4E5D;&#x3001;&#x53C2;&#x8003;&#x8D44;&#x6599;</h2>
<ul>
<li><a href="https://docs.taro.zone/docs/harmony/" target="_blank">&#x9E3F;&#x8499; &amp; OpenHarmony | Taro &#x6587;&#x6863;</a></li>
<li><a href="https://github.com/NervJS/taro" target="_blank">Taro &#x9879;&#x76EE;&#x4ED3;&#x5E93;</a></li>
<li><a href="https://docs.taro.zone/docs" target="_blank">Taro &#x5B98;&#x65B9;&#x6587;&#x6863;</a></li>
<li><a href="https://github.com/NervJS/taro-ui" target="_blank">Taro UI &#x9879;&#x76EE;&#x4ED3;&#x5E93;</a></li>
<li><a href="https://taro-ui.jd.com/" target="_blank">Taro UI &#x5B98;&#x65B9;&#x6587;&#x6863;</a></li>
<li><a href="https://www.npmjs.com/package/@tarojs/plugin-platform-harmony-cpp?activeTab=versions" target="_blank">plugin-platform-harmony-cpp</a></li>
<li><a href="https://ohpm.openharmony.cn/#/cn/detail/@taro-oh%2Flibrary" target="_blank">taro-oh</a></li>
</ul>
<h2 id="&#x5341;&#x3001;taro-&#x4ED3;&#x5E93;&#x6982;&#x89C8;"><a name="&#x5341;&#x3001;taro-&#x4ED3;&#x5E93;&#x6982;&#x89C8;" class="plugin-anchor" href="#&#x5341;&#x3001;taro-&#x4ED3;&#x5E93;&#x6982;&#x89C8;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x5341;&#x3001;Taro &#x4ED3;&#x5E93;&#x6982;&#x89C8;</h2>
<p>&#x4EE5;&#x4E0B;&#x662F; Taro &#x7684;&#x4E3B;&#x8981; NPM &#x5305;&#x53CA;&#x5176;&#x529F;&#x80FD;&#xFF1A;</p>
<table>
<thead>
<tr>
<th>&#x8DEF;&#x5F84;</th>
<th>&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>@tarojs/cli</code></td>
<td>CLI &#x5DE5;&#x5177;</td>
</tr>
<tr>
<td><code>@tarojs/service</code></td>
<td>&#x63D2;&#x4EF6;&#x5316;&#x5185;&#x6838;</td>
</tr>
<tr>
<td><code>@tarojs/taro-loader</code></td>
<td>Webpack loaders</td>
</tr>
<tr>
<td><code>@tarojs/helper</code></td>
<td>&#x5DE5;&#x5177;&#x5E93;&#xFF0C;&#x4E3B;&#x8981;&#x4F9B; CLI&#x3001;&#x7F16;&#x8BD1;&#x65F6;&#x4F7F;&#x7528;</td>
</tr>
<tr>
<td><code>@tarojs/runner-utils</code></td>
<td>&#x5DE5;&#x5177;&#x5E93;&#xFF0C;&#x4E3B;&#x8981;&#x4F9B;&#x5C0F;&#x7A0B;&#x5E8F;&#x3001;H5 &#x7684;&#x7F16;&#x8BD1;&#x5DE5;&#x5177;&#x4F7F;&#x7528;</td>
</tr>
<tr>
<td><code>@tarojs/shared</code></td>
<td>&#x5DE5;&#x5177;&#x5E93;&#xFF0C;&#x4E3B;&#x8981;&#x4F9B;&#x8FD0;&#x884C;&#x65F6;&#x4F7F;&#x7528;</td>
</tr>
<tr>
<td><code>@tarojs/taro</code></td>
<td>&#x66B4;&#x9732;&#x5404;&#x7AEF;&#x6240;&#x9700;&#x8981;&#x7684; Taro &#x5BF9;&#x8C61;</td>
</tr>
<tr>
<td><code>@tarojs/api</code></td>
<td>&#x548C;&#x5404;&#x7AEF;&#x76F8;&#x5173;&#x7684; Taro API</td>
</tr>
<tr>
<td><code>babel-preset-taro</code></td>
<td>Babel preset</td>
</tr>
<tr>
<td><code>eslint-config-taro</code></td>
<td>ESLint &#x89C4;&#x5219;</td>
</tr>
<tr>
<td><code>postcss-pxtransform</code></td>
<td>PostCSS &#x63D2;&#x4EF6;&#xFF0C;&#x8F6C;&#x6362; <code>px</code> &#x4E3A;&#x5404;&#x7AEF;&#x7684;&#x81EA;&#x9002;&#x5E94;&#x5C3A;&#x5BF8;&#x5355;&#x4F4D;</td>
</tr>
<tr>
<td><code>postcss-html-transform</code></td>
<td>PostCSS &#x63D2;&#x4EF6;&#xFF0C;&#x7528;&#x4E8E; HTML&#x3001;&#x5C0F;&#x7A0B;&#x5E8F;&#x6807;&#x7B7E;&#x7684;&#x7C7B;&#x540D;&#x76F8;&#x4E92;&#x8F6C;&#x6362;</td>
</tr>
</tbody>
</table>
<h2 id="&#x575A;&#x679C;&#x6D3E;&#x793E;&#x533A;"><a name="&#x575A;&#x679C;&#x6D3E;&#x793E;&#x533A;" class="plugin-anchor" href="#&#x575A;&#x679C;&#x6D3E;&#x793E;&#x533A;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x575A;&#x679C;&#x6D3E;&#x793E;&#x533A;</h2>
<p>&#x575A;&#x679C;&#x6D3E;&#x793E;&#x533A;&#x7531;&#x575A;&#x679C;&#x3001;&#x5C0F;&#x6CE2;&#x3001;&#x72FC;&#x54E5;&#x7B49;&#x4EBA;&#x521B;&#x5EFA;&#xFF0C;&#x56E2;&#x961F;&#x6210;&#x5458;&#x5305;&#x62EC;&#x6570;&#x4F4D;&#x534E;&#x4E3A; HDE &#x53CA; 1000+ HarmonyOS &#x5F00;&#x53D1;&#x8005;&#xFF0C;&#x4EE5;&#x53CA;&#x4E09;&#x5341;&#x4F59;&#x4F4D;&#x4E07;&#x7C89;&#x535A;&#x4E3B;/UP &#x4E3B;&#xFF0C;&#x4E13;&#x6CE8;&#x4E8E;&#x5206;&#x4EAB; HarmonyOS/OpenHarmony&#x3001;&#x4ED3;&#x9889;&#x3001;ArkUI-X&#x3001;&#x5143;&#x670D;&#x52A1;&#x3001;AI&#x3001;BlueOS &#x64CD;&#x4F5C;&#x7CFB;&#x7EDF;&#x7B49;&#x6280;&#x672F;&#x3002;&#x56E2;&#x961F;&#x6210;&#x5458;&#x4E3B;&#x8981;&#x5206;&#x5E03;&#x5728;&#x5317;&#x4EAC;&#x3001;&#x4E0A;&#x6D77;&#x3001;&#x5357;&#x4EAC;&#x3001;&#x6DF1;&#x5733;&#x3001;&#x5E7F;&#x5DDE;&#x3001;&#x82CF;&#x5DDE;&#x3001;&#x957F;&#x6C99;&#x3001;&#x5B81;&#x590F;&#x7B49;&#x5730;&#xFF0C;&#x5DF2;&#x4E3A;&#x534E;&#x4E3A;&#x3001;vivo&#x3001;&#x817E;&#x8BAF;&#x3001;&#x4E9A;&#x9A6C;&#x900A;&#x7B49;&#x63D0;&#x4F9B;&#x5F00;&#x53D1;&#x54A8;&#x8BE2;&#x670D;&#x52A1; 100+ &#x6B21;&#xFF0C;&#x7D2F;&#x8BA1;&#x7C89;&#x4E1D; 100w+&#xFF0C;&#x5B75;&#x5316;&#x5F00;&#x53D1;&#x8005; 10w+&#xFF0C;&#x8986;&#x76D6;&#x9AD8;&#x6821; 20+&#x3001;&#x4F01;&#x4E1A; 10+&#x3002;&#x81EA;&#x7814;&#x5E94;&#x7528; 40 &#x6B3E;&#xFF0C;&#x4E09;&#x65B9;&#x5E93; 80 &#x4E2A;&#xFF0C;&#x9E3F;&#x8499;&#x539F;&#x751F;&#x5E94;&#x7528;&#x8BFE;&#x7A0B; 500+&#xFF0C;&#x6301;&#x7EED;&#x52A9;&#x529B;&#x9E3F;&#x8499;&#x4ED3;&#x9889;&#x7B49;&#x751F;&#x6001;&#x7E41;&#x8363;&#x53D1;&#x5C55;&#x3002;&#x6B22;&#x8FCE;&#x5927;&#x5BB6;&#x52A0;&#x5165;&#x3002; </p>
<footer class="page-footer"><span class="copyright">powered by Gitbook</span><span class="footer-modification">&#x8BE5;&#x6587;&#x4EF6;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2025-05-25 14:07:54
</span></footer>
<script>console.log("plugin-popup....");document.onclick = function(e){ e.target.tagName === "IMG" && window.open(e.target.src,e.target.src)}</script><style>img{cursor:pointer}</style>
                </div>
                <script src="https://my.openwrite.cn/js/readmore.js"></script>
                <script>
                    var enablePlugin = false;
                    var allowDomain = "localhost";
                    if(allowDomain){
                        var currentDomain = location.hostname;
                        if ($.isArray(allowDomain)) {
                            $.each(allowDomain, function(index, item) {
                                if (currentDomain == item) {
                                    enablePlugin = true;
                                    return false;
                                }
                            });
                        }else{
                           if (currentDomain == allowDomain) {
                                enablePlugin = true;
                            }
                        }
                    }else{
                        enablePlugin = true;
                    }
                    
                    if(enablePlugin){
                        var isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
                        if (!isMobile) {
                            var btw = new BTWPlugin();
                            btw.init({"allowDomain":"localhost","blogId":"27976-1678928361372-483","name":"坚果派","qrcode":"https://luckly007.oss-cn-beijing.aliyuncs.com/images/image-20230316085818226.png","keyword":"鸿蒙坚果","id":"vip-container"});
                        }
                    }
                </script> 
          </section>
          
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>
 
          <div class="book-footer">
            
            <div class="donate">
              <div></div>
              <button class="donate-btn" onclick="showModal()">赞赏</button>
            </div>
             
            <div class="copyright"></div>
            
          </div>
          
        </div>
      </div>
      
    </div>

     
    <a
      href="1.Taro介绍.html"
      class="
        navigation navigation-prev
        
      "
      aria-label="Previous page: 3.1 Taro 框架介绍"
    >
      <i class="fa fa-angle-left"></i>
    </a>
     
    <a
      href="3.Taro运行多平台.html"
      class="
        navigation navigation-next
        
      "
      aria-label="Next page: 3.3 Taro 多平台运行"
    >
      <i class="fa fa-angle-right"></i>
    </a>
      
  </div>
  <script>
    function showModal() {
      document.getElementsByClassName("mask")[0].style.display = "block";
      document.getElementsByClassName("donate-modal")[0].style.display =
        "block";
    }
    // 切换赞赏码
    function showDonateImg(num) {
      let alipay = "";
      let wxpay = ""
      if(num){
        wxpay = "hidden"
      }else{
        alipay = "hidden"
      }
      document.getElementById("wxpay-code").hidden = wxpay;
      document.getElementById("alipay-code").hidden = alipay;
      document.getElementsByName("pay-way")[num].checked = "checked";
    }

    // 关闭赞赏框
    function closeDonateModal() {
      document.getElementsByClassName("mask")[0].style.display = "none";
      document.getElementsByClassName("donate-modal")[0].style.display = "none";
    }

    var gitbook = gitbook || [];
    gitbook.push(function () {
      gitbook.page.hasChanged({"page":{"title":"3.2 安装与配置 Taro","level":"2.2","depth":1,"next":{"title":"3.3 Taro 多平台运行","level":"2.3","depth":1,"path":"chapter1/3.Taro运行多平台.md","ref":"./chapter1/3.Taro运行多平台.md","articles":[]},"previous":{"title":"3.1 Taro 框架介绍","level":"2.1","depth":1,"path":"chapter1/1.Taro介绍.md","ref":"./chapter1/1.Taro介绍.md","articles":[]},"dir":"ltr"},"config":{"plugins":["github-buttons@2.1.0","edit-link","splitter","tbfed-pagefooter","expandable-chapters","chapter-fold","back-to-top-button","code","pageview-count","popup","search-plus","-lunr","-search","splitter","-sharing","sharing-plus","theme-lou","mind-maps","emphasize","anchors","changyan","readmore","livereload","ace","livereload"],"root":".","styles":{"website":"styles/website.css"},"pluginsConfig":{"tbfed-pagefooter":{"modify_label":"该文件修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"chapter-fold":{},"pluginsConfig":{"expandable-chapters":{}},"emphasize":{},"ace":{},"livereload":{},"splitter":{},"readmore":{"allowDomain":"localhost","blogId":"27976-1678928361372-483","name":"坚果派","qrcode":"https://luckly007.oss-cn-beijing.aliyuncs.com/images/image-20230316085818226.png","keyword":"鸿蒙坚果"},"sharing-plus":{"qq":false,"all":["facebook","google","twitter","instapaper","linkedin","pocket","stumbleupon"],"douban":false,"facebook":true,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":true,"messenger":false,"line":false,"vk":false,"pocket":true,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"popup":{},"code":{"copyButtons":true},"theme-lou":{"hide-elements":[".summary .gitbook-link",".summary .divider"],"color":"#FF4848","book-anchor-title":"本章目录","copyright":{"author":"vx:nut_pie"},"forbidCopy":true,"logo":"assets/avatar.png","book-summary-title":"文章目录","search-placeholder":"输入关键字搜索","copyrightLogo":"assets/copyright.png","favicon":"assets/avatar.png","appleTouchIconPrecomposed152":"assets/avatar.png"},"changyan":{"appid":"cyvHoCPAs","conf":"0440cfc4168ba95d73cfc52dd4d5c60b"},"fontsettings":{"theme":"white","family":"sans","size":2},"mind-maps":{},"highlight":{},"back-to-top-button":{},"pageview-count":{},"github-buttons":{"repo":"ITmxs/gitbook","types":["star","watch","fork"],"size":"small"},"sharing":{"qq":false,"all":["qq","qzone","whatsapp","douban","facebook","google","instapaper","linkedin","messenger","twitter","weibo"],"douban":false,"facebook":false,"weibo":false,"twitter":false,"pocket":false,"google":false,"qzone":false},"edit-link":{"label":"编辑此页","base":"https://github.com/ITmxs/gitbook/edit/master/"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"expandable-chapters":{},"search-plus":{}},"theme":"default","author":"坚果派","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{"themeLou":{"nav":[{"target":"_blank","url":"https://www.gitbook.com/","name":"坚果派官网"},{"target":"_blank","url":"https://www.npmjs.com/package/package","name":"ArkUI实战"},{"target":"_blank","url":"https://space.bilibili.com/480883651","name":"元服务开发实践"},{"target":"_blank","url":"https://blog.51cto.com/jianguo","name":"OpenHarmony应用开发"}],"footer":{"donate":{"wechat":"https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202901895.png","message":"随意打赏，但不要超过一顿早餐钱 💕","wxpay":"https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202901895.png","alipay":"https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202843746.png","nickname":"breeze","button":"打赏","wechatText":"微信","alipayText":"支付宝","title":"『赠人玫瑰 🌹 手有余香 』","avatar":"http://xkapp-uat.oss-cn-hangzhou.aliyuncs.com/2e7a3f70-80ab-4b50-93ec-a04dfeef949b/avatar-100.png"},"copyright":true}}},"title":"Taro for Harmony教程","language":"zh-hans","gitbook":"*","description":"Taro for Harmony电子书教程"},"file":{"path":"chapter1/2.安装Taro.md","mtime":"2025-05-25T06:07:54.168Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2025-06-30T01:16:51.558Z"},"basePath":"..","book":{"language":""}});
    });
  </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-github-buttons/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-edit-link/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-pageview-count/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-plus/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-plus/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing-plus/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-mind-maps/mindmaps.dist.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-changyan/changyan.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-ace/ace/ace.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-ace/ace.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-theme-lou/lou.js"></script>
        
    

    </body>
</html>

